package com.sgb.kjwl.model.entity;

import com.google.gson.annotations.SerializedName;
import com.swgk.core.util.StringUtil;

import java.text.DecimalFormat;

public class SearchMaterialEntity {
    @SerializedName("id")
    private String id;
    @SerializedName("item_brandName")
    private String branName;
    @SerializedName("item_cartTitle")
    private String title;
    @SerializedName("item_shopShortName")
    private String shortName;
    @SerializedName("item_areaName")
    private String cityName;
    @SerializedName("item_storageName")
    private String areaName;
    @SerializedName("item_price")
    private String price;
    @SerializedName("item_unit")
    private String unit;
    @SerializedName("imgUrl")
    private String imgUrl;
    @SerializedName("skuid")
    private String skuid;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getBranName() {
        return branName;
    }

    public void setBranName(String branName) {
        this.branName = branName;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getShortName() {
        return shortName;
    }

    public void setShortName(String shortName) {
        this.shortName = shortName;
    }

    public String getCityName() {
        return cityName;
    }

    public void setCityName(String cityName) {
        this.cityName = cityName;
    }

    public String getAreaName() {
        return areaName;
    }

    public void setAreaName(String areaName) {
        this.areaName = areaName;
    }

    public String getPrice() {
//        return StringUtil.showPrice(price);
        DecimalFormat df = new DecimalFormat("#0.00");
        return df.format(Double.parseDouble(price) / 100);
    }

    public void setPrice(String price) {
        this.price = price;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    public String getImgUrl() {
        return imgUrl;
    }

    public void setImgUrl(String imgUrl) {
        this.imgUrl = imgUrl;
    }

    public String getSkuid() {
        return skuid;
    }

    public void setSkuid(String skuid) {
        this.skuid = skuid;
    }
}
